﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace TravelWD.Models
{
    public class SearchTourModel
    {
        [Required(ErrorMessage = "Enter place name to search")]
        public string PlaceName { get; set; }
    }

    public class TourModel
    {
        public int TourID { get; set; }

        [Required(ErrorMessage="Required!")]
        public string Title { get; set; }

        [Required(ErrorMessage = "Required!")]
        public string PlaceName { get; set; }

        [Required(ErrorMessage = "Required!")]
        public string Country { get; set; }

        [Required(ErrorMessage = "Required!")]
        public string Description { get; set; }
        public bool TravelIncluded { get; set; }
        public bool AccomodationIncluded { get; set; }
        public string TravelBy { get; set; }
        public string DepartureFrom { get; set; }
        public string AccomodationDetails { get; set; }
        public string Itinerary { get; set; }
        public string DestinationDetails { get; set; }
        public string Currency { get; set; }

        [Required(ErrorMessage = "Required!")]
        [RegularExpression("\\d", ErrorMessage = "Invalid price!")]
        public decimal PricePerPerson { get; set; }

        [RegularExpression("\\d", ErrorMessage = "Invalid discount!")]
        [Range(0,100, ErrorMessage="Value between 0-100%")]
        public int Discount { get; set; }
        public string CancelPolicy { get; set; }

        [RegularExpression("\\d", ErrorMessage = "Invalid price!")]
        public decimal CancelFee { get; set; }
        public string TourPolicy { get; set; }
        public int Mindays { get; set; }
        public DateTime CreatedDate { get; set; }
        public int UserID { get; set; }
        public string TourAgentName { get; set; }
        public decimal TourRating { get; set; }
        public decimal AgentRating { get; set; }
    }
}